// 导入工具类 @项目根路径
import request from "@/utils/request"

//获取预约信息
export const getAllReservations = (reservation) => {
    //数据处理
    if(reservation.flag==0){
        return request.get("/reservation/getAllReservationsValid",reservation);
    }else{
        return request.get("/reservation/getAllReservationsUnValid",reservation);
    }
}
//通过编号获取预约信息
export const getReservationBynum = (reservation) => {
    //数据处理
    if(reservation.flag==0){
        return request.get(`/reservation/getReservationByReservationNumberValid?reservationNumber=${reservation.reservationNumber}`);
    }else{
        return request.get(`/reservation/getReservationByReservationNumberUnValid?reservationNumber=${reservation.reservationNumber}`);
    }
}
//注销医师信息
export const deletereservation = (reservationId) => {
    //数据处理
    return request.get(`/reservation/forceCancelReservation?reservationId=${reservationId}`);
}